package com.xzzz.irda.auth.server;

import com.xzzz.irda.auth.core.filter.AuthBaseFilterConfiguration;
import com.xzzz.irda.auth.core.AuthBaseProperties;
import com.xzzz.irda.auth.server.authentication.AuthServerManagerConfiguration;
import org.springframework.context.annotation.Import;

import java.lang.annotation.*;

/**
 * 开启授权服务功能
 *
 * @author wangyf
 * 
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Import({
    // COMMON - 授权服务配置文件
    AuthBaseProperties.class,
    // COMMON - 拦截器配置
    AuthBaseFilterConfiguration.class,
    // SERVER - 授权服务配置
    AuthServerConfiguration.class,
    // SERVER - 授权相关处理类
    AuthServerManagerConfiguration.class,
    // SERVER - 授权服务配置回调
    AuthServerConfigurationImporter.class
})
public @interface EnableAuthServer {

    /**
     * 开启DEBUG模式, 会产生大量日志, 生产环境禁止开启
     */
    boolean debug() default false;
}
